- id = dom_id(@tag)

- if @tag.errors.empty?
  $('##{id}').replaceWith('#{ j render(partial: "tag", collection: [ @tag ]) }');
  $('##{id}').effect('highlight', { duration: 1000 });
- else
  $('##{id}').html('#{ j render(partial: "edit") }');
  $('#tag_tagname').focus();
